home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / emacssrc.zip / EMACSSRC.TAR / emacs-19.17 / problems < prev    next >
Text File  |  1993-07-16  |  32KB  |  774 lines

  1. This file describes various problems that have been encountered
  2. in compiling, installing and running GNU Emacs.
  3.  
  4. * Inability to send an Alt-modified key, while using Emacs with X Windows.
  5.  
  6. If you have tried to bind an Alt key as a command, and it does not
  7. work to type the command, the first thing you should check is whether
  8. the key is getting through to Emacs.  To do this, type C-h c followed
  9. by the Alt-modified key.  C-h c should say what kind of event it
  10. read.  If it says it read an Alt key, then make sure you have made the
  11. key binding correctly.
  12.  
  13. If C-h c reports an event that doesn't have the Alt modifier, it may
  14. be because your X server has no key for the Alt modifier.  The X
  15. server that comes from MIT does not set up the Alt modifier by
  16. default.
  17.  
  18. If your keyboard has keys named Alt, you can enable them as follows:
  19.  
  20.     xmodmap -e 'add mod2 = Alt_L'
  21.     xmodmap -e 'add mod2 = Alt_R'
  22.  
  23. If the keyboard has just one key named Alt, then only one of those
  24. commands is needed.  The modifier `mod2' is a reasonable choice if you
  25. are using an unmodified MIT version of X.  Otherwise, choose any
  26. modifier bit not otherwise used.
  27.  
  28. If your keyboard does not have keys named Alt, you can use some other
  29. keys.  Use the keysym command in xmodmap to turn a function key (or
  30. some other 'spare' key) into Alt_L or into Alt_R, and then use the
  31. commands show above to make them modifier keys.
  32.  
  33. * `Pid xxx killed due to text modification or page I/O error'
  34.  
  35. On HP/UX, you can get that error when the Emacs executable is on an NFS
  36. file system.  HP/UX responds this way if it tries to swap in a page and
  37. does not get a response from the server within a timeout whose default
  38. value is just ten seconds.
  39.  
  40. If this happens to you, extend the timeout period.
  41.  
  42. * `expand-file-name' fails to work on any but the machine you dumped Emacs on.
  43.  
  44. On Ultrix, if you use any of the functions which look up information
  45. in the passwd database before dumping Emacs (say, by using
  46. expand-file-name in site-init.el), then those functions will not work
  47. in the dumped Emacs on any host but the one Emacs was dumped on.
  48.  
  49. The solution?  Don't use expand-file-name in site-init.el, or in
  50. anything it loads.  Yuck - some solution.
  51.  
  52. I'm not sure why this happens; if you can find out exactly what is
  53. going on, and perhaps find a fix or a workaround, please let us know.
  54. Perhaps the YP functions cache some information, the cache is included
  55. in the dumped Emacs, and is then inaccurate on any other host.
  56.  
  57. * On some variants of SVR4, Emacs does not work at all with X.
  58.  
  59. Try defining BROKEN_FIONREAD in your config.h file.  If this solves
  60. the problem, please send a bug report to tell us this is needed; be
  61. sure to say exactly what type of machine and system you are using.
  62.  
  63. * Linking says that the functions insque and remque are undefined.
  64.  
  65. Change oldXMenu/Makefile by adding insque.o to the variable OBJS.
  66.  
  67. * Emacs fails to understand most Internet host names, even though
  68. the names work properly with other programs on the same system.
  69.  
  70. This typically happens on Suns and other systems that use shared
  71. libraries.  The cause is that the site has installed a version of the
  72. shared library which uses a name server--but has not installed a
  73. similar version of the unshared library which Emacs uses.
  74.  
  75. The result is that most programs, using the shared library, work with
  76. the nameserver, but Emacs does not.
  77.  
  78. The fix is to install an unshared library that corresponds to what you
  79. installed in the shared library, and then relink Emacs.
  80.  
  81. * On a Sun running SunOS 4.1.1, you get this error message from GNU ld:
  82.  
  83.     /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment 
  84.  
  85. The problem is in the Sun shared C library, not in GNU ld.
  86.  
  87. The solution is to install Patch-ID# 100267-03 from Sun.
  88.  
  89. * Self documentation messages are garbled.
  90.  
  91. This means that the file `etc/DOC-...' doesn't properly correspond
  92. with the Emacs executable.  Redumping Emacs and then installing the
  93. corresponding pair of files should fix the problem.
  94.  
  95. * Trouble using ptys on AIX.
  96.  
  97. People often install the pty devices on AIX incorrectly.
  98. Use `smit pty' to reinstall them properly.
  99.  
  100. * Shell mode on HP/UX gives the message, "`tty`: Ambiguous".
  101.  
  102. christos@theory.tn.cornell.edu says:
  103.  
  104. The problem is that in your .cshrc you have something that tries to
  105. execute `tty`. If you are not running the shell on a real tty then 
  106. tty will print "not a tty". Csh expects one word in some places, 
  107. but tty is giving it back 3.
  108.  
  109. The solution is to add a pair of quotes around `tty` to make it a single
  110. word: 
  111.  
  112. if (`tty` == "/dev/console") 
  113.  
  114. should be changed to:
  115.  
  116. if ("`tty`" == "/dev/console") 
  117.  
  118. Even better, move things that set up terminal sections out of .cshrc
  119. and into .login.
  120.  
  121. * Using X Windows, control-shift-leftbutton makes Emacs hang.
  122.  
  123. Use the shell command `xset bc' to make the old X Menu package work.
  124.  
  125. * Emacs running under X Windows does not handle mouse clicks.
  126. * `emacs -geometry 80x20' finds a file named `80x20'.
  127.  
  128. One cause of such problems is having (setq term-file-prefix nil) in
  129. your .emacs file.  Another cause is a bad value of EMACSLOADPATH in
  130. the environment.
  131.  
  132. * Emacs starts in a directory other than the one that is current in the shell.
  133.  
  134. If the PWD environment variable exists, Emacs uses this variable as
  135. the initial working directory.
  136.  
  137. Some shells automatically update this variable, while other shells fail
  138. to do so.  If you use two such shells in combination, the variable can
  139. end up wrong.  This confuses Emacs.
  140.  
  141. The solution is to put something in the start-up file for the shell
  142. that does not update PWD, to get rid of that environment variable.
  143. For example, in csh, use `unsetenv PWD'.
  144.  
  145. * Emacs gets error message from linker on Sun.
  146.  
  147. If the error message says that a symbol such as `f68881_used' or
  148. `ffpa_used' or `start_float' is undefined, this probably indicates
  149. that you have compiled some libraries, such as the X libraries, 
  150. with a floating point option other than the default.
  151.  
  152. It's not terribly hard to make this work with small changes in
  153. crt0.c together with linking with Fcrt1.o, Wcrt1.o or Mcrt1.o.
  154. However, the easiest approach is to build Xlib with the default
  155. floating point option: -fsoft.
  156.  
  157. * Emacs fails to get default settings from X Windows server.
  158.  
  159. The X library in X11R4 has a bug; it interchanges the 2nd and 3rd
  160. arguments to XGetDefaults.  Define the macro XBACKWARDS in config.h to
  161. tell Emacs to compensate for this.
  162.  
  163. I don't believe there is any way Emacs can determine for itself
  164. whether this problem is present on a given system.
  165.  
  166. * Keyboard input gets confused after a beep when using a DECserver
  167.   as a concentrator.
  168.  
  169. This problem seems to be a matter of configuring the DECserver to use
  170. 7 bit characters rather than 8 bit characters.
  171.  
  172. * M-x shell persistently reports "Process shell exited abnormally with code 1".
  173.  
  174. This happened on Suns as a result of what is said to be a bug in Sunos
  175. version 4.0.x.  The only fix was to reboot the machine. 
  176.  
  177. * Programs running under terminal emulator do not recognize `emacs'
  178.   terminal type.
  179.  
  180. The cause of this is a shell startup file that sets the TERMCAP
  181. environment variable.  The terminal emulator uses that variable to
  182. provide the information on the special terminal type that Emacs
  183. emulates.
  184.  
  185. Rewrite your shell startup file so that it does not change TERMCAP
  186. in such a case.  You could use the following conditional which sets
  187. it only if it is undefined.
  188.  
  189.     if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file
  190.  
  191. Or you could set TERMCAP only when you set TERM--which should not
  192. happen in a non-login shell.
  193.  
  194. * X Windows doesn't work if DISPLAY uses a hostname.
  195.  
  196. People have reported kernel bugs in certain systems that cause Emacs
  197. not to work with X Windows if DISPLAY is set using a host name.  But
  198. the problem does not occur if DISPLAY is set to `unix:0.0'.  I think
  199. the bug has to do with SIGIO or FIONREAD.
  200.  
  201. You may be able to compensate for the bug by doing (set-input-mode nil nil).
  202. However, that has the disadvantage of turning off interrupts, so that
  203. you are unable to quit out of a Lisp program by typing C-g.
  204.  
  205. The easy way to do this is to put 
  206.  
  207.   (setq x-sigio-bug t)
  208.  
  209. in your site-init.el file.
  210.  
  211. * Problem with remote X server on Suns.
  212.  
  213. On a Sun, running Emacs on one machine with the X server on another
  214. may not work if you have used the unshared system libraries.  This
  215. is because the unshared libraries fail to use YP for host name lookup.
  216. As a result, the host name you specify may not be recognized.
  217.  
  218. * Watch out for .emacs files and EMACSLOADPATH environment vars
  219.  
  220. These control the actions of Emacs.
  221. ~/.emacs is your Emacs init file.
  222. EMACSLOADPATH overrides which directories the function
  223. "load" will search.
  224.  
  225. If you observe strange problems, check for these and get rid
  226. of them, then try again.
  227.  
  228. * Shell mode ignores interrupts on Apollo Domain
  229.  
  230. You may find that M-x shell prints the following message:
  231.  
  232.    Warning: no access to tty; thus no job control in this shell...
  233.  
  234. This can happen if there are not enough ptys on your system.
  235. Here is how to make more of them.
  236.  
  237.     % cd /dev
  238.     % ls pty*
  239.     # shows how many pty's you have. I had 8, named pty0 to pty7)
  240.     % /etc/crpty 8
  241.     # creates eight new pty's
  242.  
  243. * Fatal signal in the command  temacs -l loadup inc dump
  244.  
  245. This command is the final stage of building Emacs.  It is run by the
  246. Makefile in the src subdirectory, or by build.com on VMS.
  247.  
  248. It has been known to get fatal errors due to insufficient swapping
  249. space available on the machine.
  250.  
  251. On 68000's, it has also happened because of bugs in the
  252. subroutine `alloca'.  Verify that `alloca' works right, even
  253. for large blocks (many pages).
  254.  
  255. * test-distrib says that the distribution has been clobbered
  256. * or, temacs prints "Command key out of range 0-127"
  257. * or, temacs runs and dumps xemacs, but xemacs totally fails to work.
  258. * or, temacs gets errors dumping xemacs
  259.  
  260. This can be because the .elc files have been garbled.  Do not be
  261. fooled by the fact that most of a .elc file is text: these are
  262. binary files and can contain all 256 byte values.
  263.  
  264. In particular `shar' cannot be used for transmitting GNU Emacs.
  265. It typically truncates "lines".  What appear to be "lines" in
  266. a binary file can of course be of any length.  Even once `shar'
  267. itself is made to work correctly, `sh' discards null characters
  268. when unpacking the shell archive.
  269.  
  270. I have also seen character \177 changed into \377.  I do not know
  271. what transfer means caused this problem.  Various network
  272. file transfer programs are suspected of clobbering the high bit.
  273.  
  274. If you have a copy of Emacs that has been damaged in its
  275. nonprinting characters, you can fix them:
  276.  
  277.  1) Record the names of all the .elc files.
  278.  2) Delete all the .elc files.
  279.  3) Recompile alloc.c with a value of PURESIZE twice as large.
  280.      You might as well save the old alloc.o.
  281.  4) Remake xemacs.  It should work now.
  282.  5) Running xemacs, do Meta-x byte-compile-file repeatedly
  283.   to recreate all the .elc files that used to exist.
  284.   You may need to increase the value of the variable
  285.   max-lisp-eval-depth to succeed in running the compiler interpreted
  286.   on certain .el files.  400 was sufficient as of last report.
  287.  6) Reinstall the old alloc.o (undoing changes to alloc.c if any)
  288.   and remake temacs.
  289.  7) Remake xemacs.  It should work now, with valid .elc files.
  290.  
  291. * temacs prints "Pure Lisp storage exhausted"
  292.  
  293. This means that the Lisp code loaded from the .elc and .el
  294. files during  temacs -l loadup inc dump  took up more
  295. space than was allocated.
  296.  
  297. This could be caused by
  298.  1) adding code to the preloaded Lisp files
  299.  2) adding more preloaded files in loadup.el
  300.  3) having a site-init.el or site-load.el which loads files.
  301.    Note that ANY site-init.el or site-load.el is nonstandard;
  302.    if you have received Emacs from some other site
  303.    and it contains a site-init.el or site-load.el file, consider
  304.    deleting that file.
  305.  4) getting the wrong .el or .elc files
  306.    (not from the directory you expected).
  307.  5) deleting some .elc files that are supposed to exist.
  308.    This would cause the source files (.el files) to be
  309.    loaded instead.  They take up more room, so you lose.
  310.  6) a bug in the Emacs distribution which underestimates
  311.    the space required.
  312.  
  313. If the need for more space is legitimate, change the definition
  314. of PURESIZE in puresize.h.
  315.  
  316. But in some of the cases listed above, this problem is a consequence
  317. of something else that is wrong.  Be sure to check and fix the real
  318. problem.
  319.  
  320. * Changes made to .el files do not take effect.
  321.  
  322. You may have forgotten to recompile them into .elc files.
  323. Then the old .elc files will be loaded, and your changes
  324. will not be seen.  To fix this, do M-x byte-recompile-directory
  325. and specify the directory that contains the Lisp files.
  326.  
  327. Emacs should print a warning when loading a .elc file which is older
  328. than the corresponding .el file.
  329.  
  330. * The dumped Emacs (xemacs) crashes when run, trying to write pure data.
  331.  
  332. Two causes have been seen for such problems.
  333.  
  334. 1) On a system where getpagesize is not a system call, it is defined
  335. as a macro.  If the definition (in both unexec.c and malloc.c) is wrong,
  336. it can cause problems like this.  You might be able to find the correct
  337. value in the man page for a.out (5).
  338.  
  339. 2) Some systems allocate variables declared static among the
  340. initialized variables.  Emacs makes all initialized variables in most
  341. of its files pure after dumping, but the variables declared static and
  342. not initialized are not supposed to be pure.  On these systems you
  343. may need to add "#define static" to the m- or the s- file.
  344.  
  345. * Compilation errors on VMS.
  346.  
  347. You will get warnings when compiling on VMS because there are
  348. variable names longer than 32 (or whatever it is) characters.
  349. This is not an error.  Ignore it.
  350.  
  351. VAX C does not support #if defined(foo).  Uses of this construct
  352. were removed, but some may have crept back in.  They must be rewritten.
  353.  
  354. There is a bug in the C compiler which fails to sign extend characters
  355. in conditional expressions.  The bug is:
  356.     char c = -1, d = 1;
  357.     int i;
  358.  
  359.     i = d ? c : d;
  360. The result is i == 255;  the fix is to typecast the char in the
  361. conditional expression as an (int).  Known occurrences of such
  362. constructs in Emacs have been fixed.
  363.  
  364. * rmail gets error getting new mail
  365.  
  366. rmail gets new mail from /usr/spool/mail/$USER using a program
  367. called `movemail'.  This program interlocks with /bin/mail using
  368. the protocol defined by /bin/mail.
  369.  
  370. There are two different protocols in general use.  One of them uses
  371. the `flock' system call.  The other involves creating a lock file;
  372. `movemail' must be able to write in /usr/spool/mail in order to do
  373. this.  You control which one is used by defining, or not defining,
  374. the macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes.
  375. IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
  376. SYSTEM, YOU CAN LOSE MAIL!
  377.  
  378. If your system uses the lock file protocol, and fascist restrictions
  379. prevent ordinary users from writing the lock files in /usr/spool/mail,
  380. you may need to make `movemail' setgid to a suitable group such as
  381. `mail'.  You can use these commands (as root):
  382.  
  383.     chgrp mail movemail
  384.     chmod 2755 movemail
  385.  
  386. * Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0.
  387. * GNUs can't make contact with the specified host for nntp.
  388.  
  389. Some people have found that Emacs was unable to connect to the local
  390. host by name, as in DISPLAY=prep:0 if you are running on prep, but
  391. could handle DISPLAY=unix:0.  Here is what tale@rpi.edu said:
  392.  
  393.       Seems as
  394.     though gethostbyname was bombing somewhere along the way.  Well, we
  395.     had just upgrade from SunOS 3.5 (which X11 was built under) to SunOS
  396.     4.0.1.  Any new X applications which tried to be built with the pre
  397.     OS-upgrade libraries had the same problems which Emacs was having.
  398.     Missing /etc/resolv.conf for a little while (when one of the libraries
  399.     was built?) also might have had a hand in it.
  400.  
  401.     The result of all of this (with some speculation) was that we rebuilt
  402.     X and then rebuilt Emacs with the new libraries.  Works as it should
  403.     now.  Hoorah.
  404.  
  405. If you have already installed the name resolver in the file libresolv.a,
  406. then you need to compile Emacs to use that library.  The easiest way to
  407. do this is to add to config.h a definition of LIBS_SYSTEM, LIBS_MACHINE
  408. or LIB_STANDARD which uses -lresolv.  Watch out!  If you redefine a macro
  409. that is already in use in your configuration to supply some other libraries,
  410. be careful not to lose the others.
  411.  
  412. Thus, you could start by adding this to config.h:
  413.  
  414. #define LIBS_SYSTEM -lresolv
  415.  
  416. Then if this gives you an error for redefining a macro, and you see that
  417. the s- file defines LIBS_SYSTEM as -lfoo -lbar, you could change config.h
  418. again to say this:
  419.  
  420. #define LIBS_SYSTEM -lresolv -lfoo -lbar
  421.  
  422. * Emacs spontaneously displays "I-search: " at the bottom of the screen.
  423.  
  424. This means that Control-S/Control-Q "flow control" is being used.
  425. C-s/C-q flow control is bad for Emacs editors because it takes away
  426. C-s and C-q as user commands.  Since editors do not output long streams
  427. of text without user commands, there is no need for a user-issuable
  428. "stop output" command in an editor; therefore, a properly designed
  429. flow control mechanism would transmit all possible input characters
  430. without interference.  Designing such a mechanism is easy, for a person
  431. with at least half a brain.
  432.  
  433. There are three possible reasons why flow control could be taking place:
  434.  
  435.   1) Terminal has not been told to disable flow control
  436.   2) Insufficient padding for the terminal in use
  437.   3) Some sort of terminal concentrator or line switch is responsible
  438.  
  439. First of all, many terminals have a set-up mode which controls
  440. whether they generate flow control characters.  This must be
  441. set to "no flow control" in order for Emacs to work.  Sometimes
  442. there is an escape sequence that the computer can send to turn
  443. flow control off and on.  If so, perhaps the termcap `ti' string
  444. should turn flow control off, and the `te' string should turn it on.
  445.  
  446. Once the terminal has been told "no flow control", you may find it
  447. needs more padding.  The amount of padding Emacs sends is controlled
  448. by the termcap entry for the terminal in use, and by the output baud
  449. rate as known by the kernel.  The shell command `stty' will print
  450. your output baud rate; `stty' with suitable arguments will set it if
  451. it is wrong.  Setting to a higher speed causes increased padding.  If
  452. the results are wrong for the correct speed, there is probably a
  453. problem in the termcap entry.  You must speak to a local Unix wizard
  454. to fix this.  Perhaps you are just using the wrong terminal type.
  455.  
  456. For terminals that lack a "no flow control" mode, sometimes just
  457. giving lots of padding will prevent actual generation of flow control
  458. codes.  You might as well try it.
  459.  
  460. If you are really unlucky, your terminal is connected to the computer
  461. through a concentrator which sends flow control to the computer, or it
  462. insists on sending flow control itself no matter how much padding you
  463. give it.  You are screwed!  You should replace the terminal or
  464. concentrator with a properly designed one.  In the mean time,
  465. some drastic measures can make Emacs semi-work.
  466.  
  467. One drastic measure to ignore C-s and C-q, while sending enough
  468. padding that the terminal will not really lose any output.  To make
  469. such an adjustment, you need only invoke the function
  470. enable-flow-control-on with a list of terminal types in your own
  471. .emacs file.  As arguments, give it the names of one or more terminal
  472. types you use which require flow control adjustments.
  473. Here's an example:
  474.  
  475. (enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
  476.  
  477. An even more drastic measure is to make Emacs use flow control.
  478. To do this, evaluate the Lisp expression (set-input-mode nil t).
  479. Emacs will then interpret C-s and C-q as flow control commands.  (More
  480. precisely, it will allow the kernel to do so as it usually does.)  You
  481. will lose the ability to use them for Emacs commands.  Also, as a
  482. consequence of using CBREAK mode, the terminal's Meta-key, if any,
  483. will not work, and C-g will be liable to cause a loss of output which
  484. will produce garbage on the screen.  (These problems apply to 4.2BSD;
  485. they may not happen in 4.3 or VMS, and I don't know what would happen
  486. in sysV.)  You can use keyboard-translate-table, as shown above,
  487. to map two other input characters (such as C-^ and C-\) into C-s and
  488. C-q, so that you can still search and quote.
  489.  
  490. I have no intention of ever redesigning the Emacs command set for
  491. the assumption that terminals use C-s/C-q flow control.  This
  492. flow control technique is a bad design, and terminals that need
  493. it are bad merchandise and should not be purchased.  If you can
  494. get some use out of GNU Emacs on inferior terminals, I am glad,
  495. but I will not make Emacs worse for properly designed systems
  496. for the sake of inferior systems.
  497.  
  498. * Control-S and Control-Q commands are ignored completely.
  499.  
  500. For some reason, your system is using brain-damaged C-s/C-q flow
  501. control despite Emacs's attempts to turn it off.  Perhaps your
  502. terminal is connected to the computer through a concentrator
  503. that wants to use flow control.
  504.  
  505. You should first try to tell the concentrator not to use flow control.
  506. If you succeed in this, try making the terminal work without
  507. flow control, as described in the preceding section.
  508.  
  509. If that line of approach is not successful, map some other characters
  510. into C-s and C-q using keyboard-translate-table.  The example above
  511. shows how to do this with C-^ and C-\.
  512.  
  513. * Control-S and Control-Q commands are ignored completely on a net connection.
  514.  
  515. Some versions of rlogin (and possibly telnet) do not pass flow
  516. control characters to the remote system to which they connect.
  517. On such systems, emacs on the remote system cannot disable flow
  518. control on the local system.
  519.  
  520. One way to cure this is to disable flow control on the local host
  521. (the one running rlogin, not the one running rlogind) using the
  522. stty command, before starting the rlogin process.  On many systems,
  523. "stty start u stop u" will do this.
  524.  
  525. Some versions of tcsh will prevent even this from working.  One way
  526. around this is to start another shell before starting rlogin, and
  527. issue the stty command to disable flow control from that shell.
  528.  
  529. * Screen is updated wrong, but only on one kind of terminal.
  530.  
  531. This could mean that the termcap entry you are using for that
  532. terminal is wrong, or it could mean that Emacs has a bug handing
  533. the combination of features specified for that terminal.
  534.  
  535. The first step in tracking this down is to record what characters
  536. Emacs is sending to the terminal.  Execute the Lisp expression
  537. (open-termscript "./emacs-script") to make Emacs write all
  538. terminal output into the file ~/emacs-script as well; then do
  539. what makes the screen update wrong, and look at the file
  540. and decode the characters using the manual for the terminal.
  541. There are several possibilities:
  542.  
  543. 1) The characters sent are correct, according to the terminal manual.
  544.  
  545. In this case, there is no obvious bug in Emacs, and most likely you
  546. need more padding, or possibly the terminal manual is wrong.
  547.  
  548. 2) The characters sent are incorrect, due to an obscure aspect
  549.  of the terminal behavior not described in an obvious way
  550.  by termcap.
  551.  
  552. This case is hard.  It will be necessary to think of a way for
  553. Emacs to distinguish between terminals with this kind of behavior
  554. and other terminals that behave subtly differently but are
  555. classified the same by termcap; or else find an algorithm for
  556. Emacs to use that avoids the difference.  Such changes must be
  557. tested on many kinds of terminals.
  558.  
  559. 3) The termcap entry is wrong.
  560.  
  561. See the file etc/TERMS for information on changes
  562. that are known to be needed in commonly used termcap entries
  563. for certain terminals.
  564.  
  565. 4) The characters sent are incorrect, and clearly cannot be
  566.  right for any terminal with the termcap entry you were using.
  567.  
  568. This is unambiguously an Emacs bug, and can probably be fixed
  569. in termcap.c, tparam.c, term.c, scroll.c, cm.c or dispnew.c.
  570.  
  571. * Output from Control-V is slow.
  572.  
  573. On many bit-map terminals, scrolling operations are fairly slow.
  574. Often the termcap entry for the type of terminal in use fails
  575. to inform Emacs of this.  The two lines at the bottom of the screen
  576. before a Control-V command are supposed to appear at the top after
  577. the Control-V command.  If Emacs thinks scrolling the lines is fast,
  578. it will scroll them to the top of the screen.
  579.  
  580. If scrolling is slow but Emacs thinks it is fast, the usual reason is
  581. that the termcap entry for the terminal you are using does not
  582. specify any padding time for the `al' and `dl' strings.  Emacs
  583. concludes that these operations take only as much time as it takes to
  584. send the commands at whatever line speed you are using.  You must
  585. fix the termcap entry to specify, for the `al' and `dl', as much
  586. time as the operations really take.
  587.  
  588. Currently Emacs thinks in terms of serial lines which send characters
  589. at a fixed rate, so that any operation which takes time for the
  590. terminal to execute must also be padded.  With bit-map terminals
  591. operated across networks, often the network provides some sort of
  592. flow control so that padding is never needed no matter how slow
  593. an operation is.  You must still specify a padding time if you want
  594. Emacs to realize that the operation takes a long time.  This will
  595. cause padding characters to be sent unnecessarily, but they do
  596. not really cost much.  They will be transmitted while the scrolling
  597. is happening and then discarded quickly by the terminal.
  598.  
  599. Most bit-map terminals provide commands for inserting or deleting
  600. multiple lines at once.  Define the `AL' and `DL' strings in the
  601. termcap entry to say how to do these things, and you will have
  602. fast output without wasted padding characters.  These strings should
  603. each contain a single %-spec saying how to send the number of lines
  604. to be scrolled.  These %-specs are like those in the termcap
  605. `cm' string.
  606.  
  607. You should also define the `IC' and `DC' strings if your terminal
  608. has a command to insert or delete multiple characters.  These
  609. take the number of positions to insert or delete as an argument.
  610.  
  611. A `cs' string to set the scrolling region will reduce the amount
  612. of motion you see on the screen when part of the screen is scrolled.
  613.  
  614. * Your Delete key sends a Backspace to the terminal, using an AIXterm.
  615.  
  616. The solution is to include in your .Xdefaults the lines:
  617.  
  618.    *aixterm.Translations: #override <Key>BackSpace: string(0x7f)
  619.    aixterm*ttyModes: erase ^?
  620.  
  621. This makes your Backspace key send DEL (ASCII 127).
  622.  
  623. * You type Control-H (Backspace) expecting to delete characters.
  624.  
  625. Put `stty dec' in your .login file and your problems will disappear
  626. after a day or two.
  627.  
  628. The choice of Backspace for erasure was based on confusion, caused by
  629. the fact that backspacing causes erasure (later, when you type another
  630. character) on most display terminals.  But it is a mistake.  Deletion
  631. of text is not the same thing as backspacing followed by failure to
  632. overprint.  I do not wish to propagate this confusion by conforming
  633. to it.
  634.  
  635. For this reason, I believe `stty dec' is the right mode to use,
  636. and I have designed Emacs to go with that.  If there were a thousand
  637. other control characters, I would define Control-h to delete as well;
  638. but there are not very many other control characters, and I think
  639. that providing the most mnemonic possible Help character is more
  640. important than adapting to people who don't use `stty dec'.
  641.  
  642. If you are obstinate about confusing buggy overprinting with deletion,
  643. you can redefine Backspace in your .emacs file:
  644.   (global-set-key "\b" 'delete-backward-char)
  645. You may then wish to put the function  help-command  on some
  646. other key.  I leave to you the task of deciding which key.
  647.  
  648. * Editing files through RFS gives spurious "file has changed" warnings.
  649. It is possible that a change in Emacs 18.37 gets around this problem,
  650. but in case not, here is a description of how to fix the RFS bug that
  651. causes it.
  652.  
  653.     There was a serious pair of bugs in the handling of the fsync() system
  654.     call in the RFS server.
  655.  
  656.     The first is that the fsync() call is handled as another name for the
  657.     close() system call (!!).  It appears that fsync() is not used by very
  658.     many programs; Emacs version 18 does an fsync() before closing files
  659.     to make sure that the bits are on the disk.
  660.  
  661.     This is fixed by the enclosed patch to the RFS server.
  662.  
  663.     The second, more serious problem, is that fsync() is treated as a
  664.     non-blocking system call (i.e., it's implemented as a message that
  665.     gets sent to the remote system without waiting for a reply).  Fsync is
  666.     a useful tool for building atomic file transactions.  Implementing it
  667.     as a non-blocking RPC call (when the local call blocks until the sync
  668.     is done) is a bad idea; unfortunately, changing it will break the RFS
  669.     protocol.  No fix was supplied for this problem.
  670.  
  671.     (as always, your line numbers may vary)
  672.  
  673.     % rcsdiff -c -r1.2 serversyscall.c
  674.     RCS file: RCS/serversyscall.c,v
  675.     retrieving revision 1.2
  676.     diff -c -r1.2 serversyscall.c
  677.     *** /tmp/,RCSt1003677   Wed Jan 28 15:15:02 1987
  678.     --- serversyscall.c     Wed Jan 28 15:14:48 1987
  679.     ***************
  680.     *** 163,169 ****
  681.         /*
  682.          * No return sent for close or fsync!
  683.          */
  684.     !       if (syscall == RSYS_close || syscall == RSYS_fsync)
  685.             proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
  686.         else
  687.         {
  688.     --- 166,172 ----
  689.         /*
  690.          * No return sent for close or fsync!
  691.          */
  692.     !       if (syscall == RSYS_close)
  693.             proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
  694.         else
  695.         {
  696.  
  697. * Vax C compiler bugs affecting Emacs.
  698.  
  699. You may get one of these problems compiling Emacs:
  700.  
  701.    foo.c line nnn: compiler error: no table entry for op STASG
  702.    foo.c: fatal error in /lib/ccom
  703.  
  704. These are due to bugs in the C compiler; the code is valid C.
  705. Unfortunately, the bugs are unpredictable: the same construct
  706. may compile properly or trigger one of these bugs, depending
  707. on what else is in the source file being compiled.  Even changes
  708. in header files that should not affect the file being compiled
  709. can affect whether the bug happens.  In addition, sometimes files
  710. that compile correctly on one machine get this bug on another machine.
  711.  
  712. As a result, it is hard for me to make sure this bug will not affect
  713. you.  I have attempted to find and alter these constructs, but more
  714. can always appear.  However, I can tell you how to deal with it if it
  715. should happen.  The bug comes from having an indexed reference to an
  716. array of Lisp_Objects, as an argument in a function call:
  717.   Lisp_Object *args;
  718.   ...
  719.    ... foo (5, args[i], ...)...
  720. putting the argument into a temporary variable first, as in
  721.   Lisp_Object *args;
  722.   Lisp_Object tem;
  723.   ...
  724.    tem = args[i];
  725.    ... foo (r, tem, ...)...
  726. causes the problem to go away.
  727. The `contents' field of a Lisp vector is an array of Lisp_Objects,
  728. so you may see the problem happening with indexed references to that.
  729.  
  730. * 68000 C compiler problems
  731.  
  732. Various 68000 compilers have different problems.
  733. These are some that have been observed.
  734.  
  735. ** Using value of assignment expression on union type loses.
  736. This means that  x = y = z;  or  foo (x = z);  does not work
  737. if x is of type Lisp_Object.
  738.  
  739. ** "cannot reclaim" error.
  740.  
  741. This means that an expression is too complicated.  You get the correct
  742. line number in the error message.  The code must be rewritten with
  743. simpler expressions.
  744.  
  745. ** XCONS, XSTRING, etc macros produce incorrect code.
  746.  
  747. If temacs fails to run at all, this may be the cause.
  748. Compile this test program and look at the assembler code:
  749.  
  750. struct foo { char x; unsigned int y : 24; };
  751.  
  752. lose (arg)
  753.      struct foo arg;
  754. {
  755.   test ((int *) arg.y);
  756. }
  757.  
  758. If the code is incorrect, your compiler has this problem.
  759. In the XCONS, etc., macros in lisp.h you must replace (a).u.val with
  760. ((a).u.val + coercedummy) where coercedummy is declared as int.
  761.  
  762. This problem will not happen if the m-...h file for your type
  763. of machine defines NO_UNION_TYPE.  That is the recommended setting now.
  764.  
  765. * C compilers lose on returning unions
  766.  
  767. I hear that some C compilers cannot handle returning a union type.
  768. Most of the functions in GNU Emacs return type Lisp_Object, which is
  769. defined as a union on some rare architectures.
  770.  
  771. This problem will not happen if the m-...h file for your type
  772. of machine defines NO_UNION_TYPE.
  773.  
  774.